Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Union & enum syntax #103

Merged
merged 18 commits into from
May 6, 2024
Merged

Union & enum syntax #103

merged 18 commits into from
May 6, 2024

Conversation

JulianGCalderon
Copy link
Contributor

Adds support for parsing Enum and Union, this includes:

  • AST types
  • Grammar definitions
  • Examples
  • Tests

Copy link

github-actions bot commented Apr 10, 2024

Benchmarking factorial

@JulianGCalderon JulianGCalderon marked this pull request as ready for review April 10, 2024 19:35
@JulianGCalderon JulianGCalderon changed the title Syntax: Union & Enum Union & Enum Syntax Apr 12, 2024
@JulianGCalderon JulianGCalderon changed the title Union & Enum Syntax Union & enum syntax Apr 12, 2024
Copy link
Collaborator

@juanbono juanbono left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why Foo.Bar instead of Foo::Bar?

@JulianGCalderon
Copy link
Contributor Author

Why Foo.Bar instead of Foo::Bar?

I used Foo.Bar as it was the simplest to implement, given that the dot notation is used for paths and structs.

@edg-l
Copy link
Member

edg-l commented Apr 25, 2024

I'm not sure if unions should allow generics, since they will be mostly for use in ffi and/or within std. Other than that looks good.

@juanbono juanbono added this pull request to the merge queue May 6, 2024
Merged via the queue into main with commit dd268ff May 6, 2024
5 checks passed
@edg-l edg-l deleted the syntax-union-enum branch May 8, 2024 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants